package com.cxcy.swustlearner.service.Impl;

import com.cxcy.swustlearner.mapper.ClassMapper;
import com.cxcy.swustlearner.pojo.Class;
import com.cxcy.swustlearner.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ClassServiceImpl implements ClassService {
    @Autowired
    private ClassMapper classMapper;
    @Override
    public List<Class> getClasses() {
        return classMapper.selectClass();
    }

    @Override
    public void addClasses(Class c) {
        classMapper.insertClass(c);
    }
}
